import request from '@/utils/request'

export function getList() {
  return request({
    url: '/api/express_outbound_rules/index',
    method: 'get'
  })
}
export function add(data) {
  return request({
    url: '/api/express_outbound_rules/add',
    method: 'post',
    data: {
      name: data.name,
      type: data.type,
      description: data.description,
      start_weight: data.start_weight,
      end_weight: data.end_weight,
      material_code: data.material_code,
      express_company_id: data.express_company_id,
      express_controlled: data.express_controlled,
      weight_invalid: data.weight_invalid
    }
  })
}
export function edit(data) {
  return request({
    url: '/api/express_outbound_rules/edit',
    method: 'post',
    data: {
      id: data.id,
      name: data.name,
      type: data.type,
      description: data.description,
      material_code: data.material_code,
      start_weight: data.start_weight,
      end_weight: data.end_weight,
      express_controlled: data.express_controlled,
      weight_invalid: data.weight_invalid,
      express_company_id: data.express_company_id
    }
  })
}
export function del(id) {
  return request({
    url: '/api/express_outbound_rules/del',
    method: 'post',
    data: {
      id: id
    }
  })
}
export function getCompanyList() {
  return request({
    url: '/api/express_company/company',
    method: 'get'
  })
}
